<?php
	//班级
	function selectAllclasses(){
		$conn = mysqli_connect("localhost:3306","mebin","171110301cwb","SMS");
		$sql =  " select " .
				" 	classid,classname " .
				" from " .
				"   class ";
		$result = mysqli_query($conn,$sql);
		$classes = [];
		while($class = mysqli_fetch_assoc($result)){
			$classes[] = $class;
		}
		mysqli_close($conn);
		return $classes;
	}
		
?>